#define  _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <assert.h>
#include <stdbool.h>
using namespace std;

class Date
{
	friend ostream& operator<<(ostream& out, Date& d);
	friend istream& operator>>(istream& out, Date& d);

public:
	Date(int year = 2024, int month = 3, int day = 1);
	Date(const Date& d);
	Date& operator=(const Date& d);

	bool operator==(const Date& d) const;
	bool operator<(const Date& d) const;
	bool operator<=(const Date& d) const;
	bool operator>(const Date& d) const;
	bool operator>=(const Date& d) const;
	bool operator!=(const Date& d) const;

	Date operator+(int day) const;//d1 + 100;
	Date& operator+=(int day);//d1 += 100;
	Date operator-(int day) const;//d1 -100;
	Date& operator-=(int day);//d1 -100;
	int operator-(const Date& d) const;//d1 - d2;
	Date& operator++();//++d
	Date operator++(int);//d++
	Date& operator--();//--d
	Date operator--(int);//d--

	void print() const;

	int GetMonthDay(int year, int month) const;

private:
	int _year;
	int _month;
	int _day;
};

//bool operator==(const Date& d1, const Date& d2);
